import Vue from 'vue'
import App from './App'
import store from './store'
// import plugin from './js_sdk/uni-admin/plugin'

Vue.config.productionTip = false

import elementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
import './common/element-variables.scss'

import i18n from './i18n/index'
import locale from 'element-ui/lib/locale/lang/en'

Vue.use(elementUI, {
	locale
})

import utils from './common/utils.js'
Vue.prototype.$utils = utils

// Vue.use(plugin)

App.mpType = 'app'

Vue.mixin({
  onLoad: function () {
	let pages = getCurrentPages()
	let currPage = pages[pages.length - 1]
	let url = currPage.route
	uni.setNavigationBarTitle({
		title: this.$t(`pageTitle.${url}`)
	})
  }
})

const app = new Vue({
	i18n,
	store,
	...App
})
app.$mount()
